<?php include ('banniere.php'); ?>
	<section>
		<?php include('info.php'); ?>
		<div id="corps">
		<?php
		if(isset($_SESSION['statut']) && isset($_GET['categorie_sujet'])) {
		?>
		
    <form action="../Modele/insert_sujet.php" method="post">
    <table>
	
    <tr><td>
    <span class="gras">Auteur :</span> 
	<span><?php echo $_SESSION['pseudo'];?> </span>
	<input type="hidden" name="auteur" value="<?php echo $_SESSION['pseudo']; ?>" />
	<input type="hidden" name="categorie_sujet" value="<?php echo $_GET['categorie_sujet']; ?>" />
	
    </td>
	</tr><tr><td> 
	
    <span class="gras">Titre :</span>
    </td><td>
    <input type="text" name="titre" maxlength="50" size="50" value="<?php if (isset($_POST['titre'])) echo htmlentities(trim($_POST['titre'])); ?>">
    </td></tr><tr><td>
    <span class="gras">Message :</span>
    </td><td>
    <textarea name="message" cols="50" rows="10"><?php if (isset($_POST['message'])) echo htmlentities(trim($_POST['message'])); ?></textarea>
    </td></tr><tr><td><td align="right">
    <input type="submit" name="go" value="Poster">
    </td></tr></table>
    </form>	
	<?php }
	else{
		echo'<p style="color: white; text-align: center;">Vous devez être connecté pour accéder au forum</p>';
		} ?>
		</div>
	</section>
	<?php include('pied_de_page.php'); ?>       





